<?php
header('Content-type:textml;charset=utf-8');

$link = myscali_connect('localhost','root','123456');

if(!$link) {

    die('数据连接失败!' . myscali_error());
}
$page_size=2;
$result=mysqli_query($link,'select count(*) form emp_info');
$count=mysqli_fetch_row($result);
$count=$count[0];
$max_page=ceil($count/$page_size);
$page=isset($_GET['page'])?intval($_GET['page']):1;
$page=$page>$max_page?$max_page:$page;
$page_html="<a href ='./show.List.php?page=1'>首页</a>&nbsp;";
$page_html .="<a href ='./show.List.php?page=".(($page -1)>0?($page -1):1)."''>上一页</a>&nbsp;";
$page_html .="<a href ='./show.List.php?page=".(($page +1)>0?($page +1):$max_page)."''>上一页</a>&nbsp;";
$page_html="<a href ='./show.List.php?page=$max_page'>尾页</a>&nbsp;";
$lim=($page -1)*2;
$sql="select from emp_info limit $lim,2";
$result=mysqli_query($link,$sql);
define('APP','itcase');
require './list_html.php';